package com.hanhai.material.wxauth.entity;

import com.hanhai.material.wages.entity.SysUser;
import com.mybatisflex.annotation.*;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 *  实体类。
 *
 * @author youchuang
 * @since 2023/10/18 14:41:16
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(value = "sys_menu",dataSource = "wechat")
public class SysMenu implements Serializable {

    @Id(keyType = KeyType.None)
    private String id;

    private String parentId;

    private String menuName;

    private String menuPath;

    private String menuUrl;

    private String menuCode;

    private String menuIcon;

    private Integer menuOrder;

    private String menuType;

    private String menuTypeName;

    private String createUserId;
    @Column(onInsertValue = "now()")
    private Date createTime;

    private String updateUserId;

    @Column(onUpdateValue = "now()")
    private Date updateTime;

    private Boolean isDelete;

    private String workShopName;

    private String pid;

    @RelationOneToMany(selfField = "id",targetField = "pid")
    private List<SysMenu> menuList;

//    @RelationOneToOne(selfField = "createUserId", targetField = "id")
//    private SysUser createUser;
//    @RelationOneToOne(selfField = "updateUserId", targetField = "id")
//    private SysUser updateUser;




}
